The present invention relates generally to process control systems and, more particularly, to detecting, storing and reporting the sequence of detectable events occurring within a process control system.
Process control systems, like those used in chemical, petroleum or other processes, typically include one or more process controllers communicatively coupled to at least one host or operator workstation and to one or more field devices via analog, digital or combined analog/digital buses. The field devices, which may be, for example valves, valve positioners, switches and transmitters (e.g., temperature, pressure and flow rate sensors), perform functions within the process plant such as opening or closing valves and measuring process parameters. The process controllers receive signals indicative of process measurements made by the field devices and/or other information pertaining to the field devices, use this information to implement control routines and then generate control signals which are sent over the buses to the field devices to control the operation of the process. Information from the field devices and the controllers is typically made available to one or more applications executed by the operator workstation to enable an operator to perform any desired function with respect to the process, such as viewing the current state of the process, modifying the operation of the process, etc.
In the past, conventional field devices were used to send and receive analog (e.g., 4 to 20 milliamp) signals to and from the process controllers via an analog bus or analog lines. These 4 to 20 milliamp signals were limited in nature in that they were indicative of measurements made by the device or of control signals generated by the controller required to control the operation of the device. However, in the past decade or so, smart field devices including a microprocessor and a memory have become prevalent in the process control industry. In addition to performing a primary function within the process, smart field devices store data pertaining to the device, communicate with the controller and/or other devices in a digital or combined digital and analog format, and perform secondary tasks such as self-calibration, identification, diagnostics, etc. A number of standard and open smart device communication protocols such as the HART(copyright)), PROFIBUS(copyright), WORLDFIP(copyright)V, Device-Net(copyright), and CAN protocols, have been developed to enable smart field devices made by different manufacturers to be used together within the same process control network.
Moreover, there has been a move within the process control industry to decentralize process control functions. For example, the all-digital, two-wire bus protocol promulgated by the Fieldbus Foundation, known as the FOUNDATION(trademark) Fieldbus (hereinafter xe2x80x9cFieldbusxe2x80x9d) protocol uses function blocks located in different field devices to perform control operations previously performed within a centralized controller. In particular, each Fieldbus field device is capable of including and executing one or more function blocks, each of which receives inputs from and/or provides outputs to other function blocks (either within the same device or within different devices), and performs some process control operation, such as measuring or detecting a process parameter, controlling a device or performing a control operation, such as implementing a proportional-derivative-integral (PID) control routine. The different function blocks within a process control system are configured to communicate with each other (e.g., over a bus) to form one or more process control loops, the individual operations of which are spread throughout the process and are, thus, decentralized.
Furthermore, in many process plants, signals associated with significant events, such as signals associated with the position of certain safety switches or shutdown valves, signals indicating an overflow or underflow detected by certain sensors, signals associated with the operation of important power generation or control devices, signals from fault detection devices or other binary on-off type signals associated with devices within the plant are monitored to detect changes in these signals and to thereby detect xe2x80x9ceventsxe2x80x9d within the process plant. The time at which these monitored events occur are recorded and stored in a sequence of events database for use in, for example, debugging the system after a failure or other significant operational situation has occurred.
The use of a sequence of events (SOE) database is beneficial because the occurrence of one event, such as the failure of a device or a communication channel, may cause other events to occur, which may cause still other events to occur eventually leading to, for example, a cascading complete or partial shutdown of the process control plant. To ascertain the ultimate source of the failure in an attempt to correct the problem, a maintenance or control operator may view the sequence of events log stored within the SOE database to determine which events occurred in what order so as to ascertain the precipitating cause of the failure within the system.
The use of sequence of events reporting is common and fairly straight forward in a system having only one node or having a single controller attached to devices through one sequence of events SOE input/output (P/O) detection card, as all the monitored event information passes through the same SOE card and controller. However, in a process control system having a single controller coupled to multiple SOE cards, or in a system having multiple controllers at different nodes, each of which is connected to one or more devices via one or more SOE cards, sequence of events reporting becomes more difficult because the controllers and each of the different SOE cards must be time synchronized to accurately record the order of different events occurring in different parts of the plant. If the controllers or the SOE cards are out of time synchronization, the time information in the sequence of events log is likely to be incorrect which may lead the events being sequenced in an improper order. Further, because the multiple events resulting in a significant event, such as a failure of a node, typically occur very rapidly, e.g., within ten milliseconds of each other, it is desirable to increase the time sensitivity of the sequence of events reporting to the order of five milliseconds be able to detect the actual order in which the different monitored events occur. Generally speaking, this time sensitivity has been very difficult to obtain without highly accurate or synchronized clocks at each SOE card. Unfortunately, it can be prohibitively expensive to place an accurate and stable clock in each SOE card and it can be very difficult to accurately time synchronize many clocks in the system in order to time stamp events when these events are detected at the SOE cards.
A sequence of events detection system and method for use in a process control network uses SOE cards to automatically detect and store indications of events and the times at which these events took place within the process control network. The sequence of events reporting system includes a stable master time source, such as a global positioning system (GPS) receiver which is used to periodically time synchronize clocks within each of the nodes of the system, such as within each of the controllers, user workstations, etc. Free running counters, such as quartz counters, are located within each controller and within each SOE card being used to detect events to be stored in the sequence of events log. These free running counters are used to mark each event with a counter value when the SOE card or controller first detects the event. Indications of the event and of the counter value associated with a detected event are sent to a corresponding controller (if need be), which uses its clock, its counter and an indication of the value of the SOE counter assigned to the event to ascertain the actual or absolute time that the event was detected at the SOE card. The event and the time for that event is then sent to a sequence of events reporting database, where this information is stored to form a system-wide sequence of events log. The receipt of an event in the sequence of events database may be acknowledged back to a controller and SOE card which enables the SOE card to clear that event from its memory. The use of simple counters in the SOE cards and clocks in the controllers reduces the cost and complexity of the system while still enabling a highly time sensitive or time discriminating network-wide sequence of events reporting system.
According to one aspect of the invention, a sequence of events detection system includes a master clock, a first device, and a second device. The first device is communicatively coupled to the master clock and includes a first counter and a secondary clock time synchronized to the master clock. The second device is communicatively coupled to the first device and includes an event buffer and a second counter. The second device also includes a processor programmed to, upon the detection of an event, store an indication of the event in the event buffer and store the value of the second counter at the time of the detection of the event as an event counter value in the event buffer. The processor of the second device is further programmed to send an event message to the first device, the event message including the indication of the stored event and an indiction of the event counter value for the event. Still further, the first device includes a processor programmed to use the first counter, the secondary clock and the indication of the event counter value within the event message to assign an absolute time to the detection of the event. If desired, the first device may send a further event message including the indication of the event and the absolute time for the event to a sequence of events database which stores events detected at different nodes of the process control system.